1. Technical Field
The present disclosure relates to transformation of eXtensible Markup Language (XML) data and more specifically to providing enhanced flexibility for users to transform XML data to a desired format.
2. Related Art
XML (eXtensible Markup Language) refers to a language/specification used for describing information/data. XML enables users to specify desired characteristics (of the data being described) in the form of associated elements, with each element typically containing a corresponding start and end tag, and optionally attributes. At least the start tag contains an identifier to uniquely identify the element. Desired data portions are enclosed between the respective start and end tags of an element, implying that the enclosed data is described by the corresponding identifier.
In general, the user may specify any desired elements for describing the data. Such a feature is in sharp contrast to other markup languages such as HTML (hypertext markup language), where the elements are generally pre-defined, and a user is enabled only to associate the data being described with the desired pre-defined elements.
There is often a need to transform XML data to another format. Such another format could be XML data characterized using different sets of elements (and/or respective attributes), plain unstructured text format, other structured formats (e.g., consistent with PDF, Word Document, data base format), etc.
XSL (eXtensible Stylesheet Language) is a commonly used specification for specifying such XML transformations. A user specifies several transformation rules according to XSL, with each transformation rule specifying the output portion corresponding to an element in the input XML. The transformation rules may include pre-defined functions according to XPath (XML Path Language) specification, as is well known in the arts. The transformation rules and pre-defined functions are respectively described in the documents entitled “XSL Transformations (XSLT) Version 1.0, W3C Recommendation” and “XML Path Language (XPath) Version 1.0 W3C Recommendation”, both dated 16 Nov. 1999 and both available from W3 Consortium located at W3C/MIT, 32 Vassar Street, Room 32-G515, Cambridge, Mass. 02139.
However, such XSL (and XPath) based approaches may be inadequate for specifying transformations in several environments. Aspects of the present disclosure provide enhanced flexibility for users to transform XML data to a desired format, as described below with examples.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.